/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javacommon.base.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class CrmRight extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "CrmRight";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CODE = "code";
	public static final String ALIAS_PARENT_CODE = "parentCode";
	public static final String ALIAS_TYPE = "type";
	public static final String ALIAS_TEXT = "text";
	public static final String ALIAS_URL = "url";
	public static final String ALIAS_RIGHT_DESC = "rightDesc";
	public static final String ALIAS_RIGHT_SORT = "rightSort";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大�?0")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Integer id;
    /**
     * code       db_column: code 
     */	
	private java.lang.String code;
    /**
     * parentCode       db_column: parent_code 
     */	
	private java.lang.String parentCode;
    /**
     * type       db_column: type 
     */	
	private java.lang.String type;
    /**
     * text       db_column: text 
     */	
	private java.lang.String text;
    /**
     * url       db_column: url 
     */	
	private java.lang.String url;
    /**
     * rightDesc       db_column: rightDesc 
     */	
	private java.lang.String rightDesc;
	/**
	 * rightSort       db_column: rightSort 
	 */	
	private java.lang.Integer rightSort;
	//columns END

	public CrmRight(){
	}

	public CrmRight(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setCode(java.lang.String value) {
		this.code = value;
	}
	
	public java.lang.String getCode() {
		return this.code;
	}
	public void setParentCode(java.lang.String value) {
		this.parentCode = value;
	}
	
	public java.lang.String getParentCode() {
		return this.parentCode;
	}
	public void setType(java.lang.String value) {
		this.type = value;
	}
	
	public java.lang.String getType() {
		return this.type;
	}
	public void setText(java.lang.String value) {
		this.text = value;
	}
	
	public java.lang.String getText() {
		return this.text;
	}
	public void setUrl(java.lang.String value) {
		this.url = value;
	}
	
	public java.lang.String getUrl() {
		return this.url;
	}
	public void setRightDesc(java.lang.String value) {
		this.rightDesc = value;
	}
	
	public java.lang.String getRightDesc() {
		return this.rightDesc;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Code",getCode())
			.append("ParentCode",getParentCode())
			.append("Type",getType())
			.append("Text",getText())
			.append("Url",getUrl())
			.append("RightDesc",getRightDesc())
			.append("RightSort",getRightSort())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof CrmRight == false) return false;
		if(this == obj) return true;
		CrmRight other = (CrmRight)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}

	public java.lang.Integer getRightSort() {
		return rightSort;
	}

	public void setRightSort(java.lang.Integer rightSort) {
		this.rightSort = rightSort;
	}
	
}

